﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Data_DAO_DTO_Lib.DTO
{
    public abstract class DTO
    {
        protected int _ID;

        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        protected bool _Xoa;

        public bool Xoa
        {
            get { return _Xoa; }
            set { _Xoa = value; }
        }

        public DTO()
        {
            this.Xoa = false;
        }
        //public abstract void fromObjectDatabase(Object ob);
        //public abstract Object toObjectDatabase();
    }

    public class CANBANLIENQUAN_DTO : DTO
    {
        private int _IDCanBan;

        public int IDCanBan
        {
            get { return _IDCanBan; }
            set { _IDCanBan = value; }
        }

        private int _IDCanBanLienQuan;

        public int IDCanBanLienQuan
        {
            get { return _IDCanBanLienQuan; }
            set { _IDCanBanLienQuan = value; }
        }

        public CANBANLIENQUAN toObjectDatabase()
        {
            throw new NotImplementedException();
        }

        public void fromObjectDatabase(CANBANLIENQUAN ob)
        {
            throw new NotImplementedException();
        }
    }

    public class PHANQUYEN_DTO : DTO
    {
        private int _IDLoaiTaiKhoan;

        public int IDLoaiTaiKhoan
        {
            get { return _IDLoaiTaiKhoan; }
            set { _IDLoaiTaiKhoan = value; }
        }

        private int _IDQuyen;

        public int IDQuyen
        {
            get { return _IDQuyen; }
            set { _IDQuyen = value; }
        }
        public PHANQUYEN toObjectDatabase()
        {
            PHANQUYEN tt = new PHANQUYEN();
            tt.IDLoaiTaiKhoan = this.IDLoaiTaiKhoan;
            tt.IDQuyen = this.IDQuyen;
            return tt;
        }

        public void fromObjectDatabase(PHANQUYEN ob)
        {
            this.ID = ob.ID;
            this.IDLoaiTaiKhoan = ob.IDLoaiTaiKhoan;
            this.IDQuyen = ob.IDQuyen;
            this.Xoa = ob.Xoa;
        }
    }

    public class QUYEN_DTO : DTO
    {
        private string _TenQuyen;

        public string TenQuyen
        {
            get { return _TenQuyen; }
            set { _TenQuyen = value; }
        }
        public QUYEN toObjectDatabase()
        {
            QUYEN tt = new QUYEN();
            tt.TenQuyen = this.TenQuyen;
            return tt;
        }

        public void fromObjectDatabase(QUYEN ob)
        {
            this.ID = ob.ID;
            this.TenQuyen = ob.TenQuyen;
            this.Xoa = ob.Xoa;
        }
    }

    public class XUATXUDETAI_DTO : DTO
    {
        private string _Ten;

        public string Ten
        {
            get { return _Ten; }
            set { _Ten = value; }
        }
        public XUATXUDETAI toObjectDatabase()
        {
            throw new NotImplementedException();
        }

        public void fromObjectDatabase(XUATXUDETAI ob)
        {
            this.ID = ob.ID;
            this.Ten = ob.Ten;
            this.Xoa = ob.Xoa; 
        }
    }

    public class CHUYENGIAO_DTO : DTO
    {

        private string _Ten;

        public string Ten
        {
            get { return _Ten; }
            set { _Ten = value; }
        }
        public CHUYENGIAO toObjectDatabase()
        {
            throw new NotImplementedException();
        }

        public void fromObjectDatabase(CHUYENGIAO ob)
        {
            this.ID = ob.ID;
            this.Ten = ob.Ten;
            this.Xoa = ob.Xoa;
        }
    }

    public class CUNGCAP_DTO : DTO
    {

        private string _Ten;

        public string Ten
        {
            get { return _Ten; }
            set { _Ten = value; }
        }
        public CUNGCAP toObjectDatabase()
        {
            throw new NotImplementedException();
        }

        public void fromObjectDatabase(CUNGCAP ob)
        {
            this.ID = ob.ID;
            this.Ten = ob.Ten;
            this.Xoa = ob.Xoa;
        }
    }

    public partial class DANHMUC_DTO : DTO
    {
        public DANHMUC toObjectDatabase()
        {
            DANHMUC ob = new DANHMUC();
            ob.ID = this.ID;

            ob.TenDanhMuc = this.TenDanhMuc;
            ob.Xoa = this.Xoa;
            ob.SoLuongTrongDanhMuc = this.SoLuongTrongDanhMuc;

            return ob;
        }

        private string _TenDanhMuc;

        public string TenDanhMuc
        {
            get { return _TenDanhMuc; }
            set { _TenDanhMuc = value; }
        }

        private int _SoLuongTrongDanhMuc;

        public int SoLuongTrongDanhMuc
        {
            get { return _SoLuongTrongDanhMuc; }
            set { _SoLuongTrongDanhMuc = value; }
        }

        public void fromObjectDatabase(DANHMUC ob)
        {
            this.ID = ob.ID;
            this.TenDanhMuc = ob.TenDanhMuc;
            this.Xoa = ob.Xoa;
            this.SoLuongTrongDanhMuc = ob.SoLuongTrongDanhMuc;
        }
    }

    public partial class DANHMUCANBAN_DTO : DTO
    {
        public DANHMUCANBAN toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private int _IDCanBan;

        public int IDCanBan
        {
            get { return _IDCanBan; }
            set { _IDCanBan = value; }
        }

        private int _IDDanhMuc;

        public int IDDanhMuc
        {
            get { return _IDDanhMuc; }
            set { _IDDanhMuc = value; }
        }


        public void fromObjectDatabase(DANHMUCANBAN ob)
        {
            throw new NotImplementedException();
        }
    }

    public class DANHMUCCANMUA_DTO : DTO
    {
        public DANHMUCCANMUA toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private int _IDCanMua;

        public int IDCanMua
        {
            get { return _IDCanMua; }
            set { _IDCanMua = value; }
        }

        private int _IDDanhMuc;

        public int IDDanhMuc
        {
            get { return _IDDanhMuc; }
            set { _IDDanhMuc = value; }
        }

        public void fromObjectDatabase(DANHMUCCANMUA ob)
        {
            throw new NotImplementedException();
        }
    }

    public class DANHMUCDOANHNGHIEP_DTO:DTO
    {

        public DANHMUCDOANHNGHIEP toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private int _IDDoanhNghiep;

        public int IDDoanhNghiep
        {
            get { return _IDDoanhNghiep; }
            set { _IDDoanhNghiep = value; }
        }

        private int _IDDanhMuc;

        public int IDDanhMuc
        {
            get { return _IDDanhMuc; }
            set { _IDDanhMuc = value; }
        }

        public void fromObjectDatabase(DANHMUCDOANHNGHIEP ob)
        {
            throw new NotImplementedException();
        }
    }

    public class DANHSACHCANBANQUANTAM_DTO : DTO
    {
        public DANHSACHCANBANQUANTAM toObjectDatabase()
        {
            DANHSACHCANBANQUANTAM tt = new DANHSACHCANBANQUANTAM();
            tt.ID = this.ID;
            tt.IDTaiKhoanQuanTam = this.IDTaiKhoanQuanTam;
            tt.IDThongTinCanBan = this.IDThongTinCanBan;
            tt.NgayQuanTam = this.NgayQuanTam;
            tt.Xoa = this.Xoa;
            return tt;
        }
        private int _IDTaiKhoanQuanTam;

        public int IDTaiKhoanQuanTam
        {
            get { return _IDTaiKhoanQuanTam; }
            set { _IDTaiKhoanQuanTam = value; }
        }

        private int _IDThongTinCanBan;

        public int IDThongTinCanBan
        {
            get { return _IDThongTinCanBan; }
            set { _IDThongTinCanBan = value; }
        }

        private System.DateTime _NgayQuanTam;

        public System.DateTime NgayQuanTam
        {
            get { return _NgayQuanTam; }
            set { _NgayQuanTam = value; }
        }

        public void fromObjectDatabase(DANHSACHCANBANQUANTAM ob)
        {
            this.ID = ob.ID;
            this.IDTaiKhoanQuanTam = ob.IDTaiKhoanQuanTam;
            this.IDThongTinCanBan = ob.IDThongTinCanBan;
            this.NgayQuanTam = ob.NgayQuanTam;
            this.Xoa = ob.Xoa;
        }
    }

    public class DANHSACHCHUYENGIAOCANBAN_DTO : DTO
    {
        public DANHSACHCHUYENGIAOCANBAN toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private int _IDChuyenGiao;

        public int IDChuyenGiao
        {
            get { return _IDChuyenGiao; }
            set { _IDChuyenGiao = value; }
        }
        private int _IDChuyenGiaoCanBan;

        public int IDChuyenGiaoCanBan
        {
            get { return _IDChuyenGiaoCanBan; }
            set { _IDChuyenGiaoCanBan = value; }
        }

        public void fromObjectDatabase(DANHSACHCHUYENGIAOCANBAN ob)
        {
            throw new NotImplementedException();
        }
    }

    public partial class DANHSACHCUNGCAPCANBAN_DTO : DTO
    {

        public DANHSACHCUNGCAPCANBAN toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private int _IDChuyenGiaoCanBan;

        public int IDChuyenGiaoCanBan
        {
            get { return _IDChuyenGiaoCanBan; }
            set { _IDChuyenGiaoCanBan = value; }
        }

        private int _IDCungCap;

        public int IDCungCap
        {
            get { return _IDCungCap; }
            set { _IDCungCap = value; }
        }

        public void fromObjectDatabase(DANHSACHCUNGCAPCANBAN ob)
        {
            throw new NotImplementedException();
        }
    }

    public partial class DANHSACHDOANHNGHIEPQUANTAM_DTO : DTO
    {

        public DANHSACHDOANHNGHIEPQUANTAM toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private int _IDTaiKhoanQuanTam;

        public int IDTaiKhoanQuanTam
        {
            get { return _IDTaiKhoanQuanTam; }
            set { _IDTaiKhoanQuanTam = value; }
        }

        private int _IDDoanhNghiep;

        public int IDDoanhNghiep
        {
            get { return _IDDoanhNghiep; }
            set { _IDDoanhNghiep = value; }
        }

        private System.DateTime _NgayQuanTam;

        public System.DateTime NgayQuanTam
        {
            get { return _NgayQuanTam; }
            set { _NgayQuanTam = value; }
        }

        public void fromObjectDatabase(DANHSACHDOANHNGHIEPQUANTAM ob)
        {
            throw new NotImplementedException();
        }
    }

    public class DANHSACHLINHVUCQUANTAM_DTO : DTO
    {
        public DANHSACHLINHVUCQUANTAM toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private int _IDTaiKhoanQuanTam;

        public int IDTaiKhoanQuanTam
        {
            get { return _IDTaiKhoanQuanTam; }
            set { _IDTaiKhoanQuanTam = value; }
        }

        private int _IDDanhMuc;

        public int IDDanhMuc
        {
            get { return _IDDanhMuc; }
            set { _IDDanhMuc = value; }
        }

        private System.DateTime _NgayQuanTam;

        public System.DateTime NgayQuanTam
        {
            get { return _NgayQuanTam; }
            set { _NgayQuanTam = value; }
        }

        public void fromObjectDatabase(DANHSACHLINHVUCQUANTAM ob)
        {
            throw new NotImplementedException();
        }
    }
    public partial class DANHSACHTIMMUAQUANTAM_DTO : DTO
    {
        public DANHSACHTIMMUAQUANTAM toObjectDatabase()
        {
            DANHSACHTIMMUAQUANTAM tt = new DANHSACHTIMMUAQUANTAM();
            tt.ID = this.ID;
            tt.IDTaiKhoanQuanTam = this.IDTaiKhoanQuanTam;
            tt.IDThongTinTimMua = this.IDThongTinTimMua;
            tt.NgayQuanTam = this.NgayQuanTam;
            tt.Xoa = this.Xoa;
            return tt;
        }

        private int _IDTaiKhoanQuanTam;

        public int IDTaiKhoanQuanTam
        {
            get { return _IDTaiKhoanQuanTam; }
            set { _IDTaiKhoanQuanTam = value; }
        }

        private int _IDThongTinTimMua;

        public int IDThongTinTimMua
        {
            get { return _IDThongTinTimMua; }
            set { _IDThongTinTimMua = value; }
        }

        private System.DateTime _NgayQuanTam;

        public System.DateTime NgayQuanTam
        {
            get { return _NgayQuanTam; }
            set { _NgayQuanTam = value; }
        }

        public void fromObjectDatabase(DANHSACHTIMMUAQUANTAM ob)
        {
            this.ID = ob.ID;
            this.IDTaiKhoanQuanTam = ob.IDTaiKhoanQuanTam;
            this.IDThongTinTimMua = ob.IDThongTinTimMua;
            this.NgayQuanTam = ob.NgayQuanTam;
            this.Xoa = ob.Xoa;
        }
    }

    public partial class DICHVUCANBAN_DTO : DTO
    {
        public DICHVUCANBAN toObjectDatabase()
        {
            DICHVUCANBAN tt = new DICHVUCANBAN();
            tt.ID = this.ID;
            tt.IDCanBan = this.IDCanBan;
            tt.Xoa = this.Xoa;
            tt.DoiTuongSuDung = this.DoiTuongSuDung;
            return tt;
        }
        private string _DoiTuongSuDung;

        public string DoiTuongSuDung
        {
            get { return _DoiTuongSuDung; }
            set { _DoiTuongSuDung = value; }
        }

        private int _IDCanBan;

        public int IDCanBan
        {
            get { return _IDCanBan; }
            set { _IDCanBan = value; }
        }
        public void fromObjectDatabase(DICHVUCANBAN ob)
        {
            this.ID = ob.ID;
            this.IDCanBan = ob.IDCanBan;
            this.Xoa = ob.Xoa;
            this.DoiTuongSuDung = ob.DoiTuongSuDung;
        }
    }

    public partial class DOANHNGHIEP_DTO : DTO
    {
        public DOANHNGHIEP toObjectDatabase()
        {
            DOANHNGHIEP ob = new DOANHNGHIEP();
            ob.CacSanPhamDaSanXuat = this.CacSanPhamDaSanXuat;
            ob.ChucNangCongTy = this.ChucNangCongTy;
            ob.DiaChi = this.DiaChi;
            ob.GioiThieu = this.GioiThieu;
            ob.HinhAnh = this.HinhAnh;
            ob.ID = this.ID;
            ob.NgayThanhLap = this.NgayThanhLap;
            ob.NguoiDaiDien = this.NguoiDaiDien;
            ob.TenCuaHang = this.TenCuaHang;
            ob.TongSoNhanVien = this.TongSoNhanVien;
            ob.Xoa = this.Xoa;
            return ob;
        }
        private string _TenCuaHang;

        public string TenCuaHang
        {
            get { return _TenCuaHang; }
            set { _TenCuaHang = value; }
        }

        private System.DateTime _NgayThanhLap;


        public System.DateTime NgayThanhLap
        {
            get { return _NgayThanhLap; }
            set { _NgayThanhLap = value; }
        }

        private string _NguoiDaiDien;

        public string NguoiDaiDien
        {
            get { return _NguoiDaiDien; }
            set { _NguoiDaiDien = value; }
        }

        private string _DiaChi;


        public string DiaChi
        {
            get { return _DiaChi; }
            set { _DiaChi = value; }
        }

        private int _TongSoNhanVien;

        public int TongSoNhanVien
        {
            get { return _TongSoNhanVien; }
            set { _TongSoNhanVien = value; }
        }

        private string _GioiThieu;

        public string GioiThieu
        {
            get { return _GioiThieu; }
            set { _GioiThieu = value; }
        }

        private string _ChucNangCongTy;

        public string ChucNangCongTy
        {
            get { return _ChucNangCongTy; }
            set { _ChucNangCongTy = value; }
        }

        private string _CacSanPhamDaSanXuat;

        public string CacSanPhamDaSanXuat
        {
            get { return _CacSanPhamDaSanXuat; }
            set { _CacSanPhamDaSanXuat = value; }
        }

        private string _HinhAnh;

        public string HinhAnh
        {
            get { return _HinhAnh; }
            set { _HinhAnh = value; }
        }

        public void fromObjectDatabase(DOANHNGHIEP ob)
        {
            this.CacSanPhamDaSanXuat = ob.CacSanPhamDaSanXuat;
            this.ChucNangCongTy = ob.ChucNangCongTy;
            this.DiaChi = ob.DiaChi;
            this.GioiThieu = ob.GioiThieu;
            this.HinhAnh = ob.HinhAnh;
            this.ID = ob.ID;
            this.NgayThanhLap = ob.NgayThanhLap;
            this.NguoiDaiDien = ob.NguoiDaiDien;
            this.TenCuaHang = ob.TenCuaHang;
            this.TongSoNhanVien = ob.TongSoNhanVien;
            this.Xoa = ob.Xoa;
        }
    }


    public class LINHVUC_DTO : DTO
    {
        public LINHVUC toObjectDatabase()
        {
            LINHVUC lv = new LINHVUC();

            lv.ID = this.ID;
            lv.IDLinhVucCha = this.IDLinhVucCha;
            lv.Ten = this.Ten;
            lv.Xoa = this.Xoa;
            return lv;
        }
        private string _Ten;

        public string Ten
        {
            get { return _Ten; }
            set { _Ten = value; }
        }

        private System.Nullable<int> _IDLinhVucCha;

        public System.Nullable<int> IDLinhVucCha
        {
            get { return _IDLinhVucCha; }
            set { _IDLinhVucCha = value; }
        }

        public void fromObjectDatabase(LINHVUC ob)
        {
            this.ID = ob.ID;
            this.IDLinhVucCha = ob.IDLinhVucCha;
            this.Ten = ob.Ten;
            this.Xoa = ob.Xoa;
        }
    }

    public class LINHVUCCANBAN_DTO : DTO
    {
        public LINHVUCCANBAN toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private int _ID;

        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        private int _IDCanBan;

        public int IDCanBan
        {
            get { return _IDCanBan; }
            set { _IDCanBan = value; }
        }

        private int _IDLinhVuc;

        public int IDLinhVuc
        {
            get { return _IDLinhVuc; }
            set { _IDLinhVuc = value; }
        }


        public void fromObjectDatabase(LINHVUCCANBAN ob)
        {
            throw new NotImplementedException();
        }
    }

    public class LOAITAIKHOAN_DTO : DTO
    {
        public LOAITAIKHOAN toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private string _TenLoaiTaiKhoan;

        public string TenLoaiTaiKhoan
        {
            get { return _TenLoaiTaiKhoan; }
            set { _TenLoaiTaiKhoan = value; }
        }

        public void fromObjectDatabase(LOAITAIKHOAN ob)
        {
            this.ID = ob.ID;
            this.TenLoaiTaiKhoan = ob.TenLoaiTaiKhoan;
            this.Xoa = ob.Xoa;
        }
    }

    public partial class LOAITHANHVIEN_DTO : DTO
    {
        public LOAITHANHVIEN toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private string _TenLoaiThanhVien;

        public string TenLoaiThanhVien
        {
            get { return _TenLoaiThanhVien; }
            set { _TenLoaiThanhVien = value; }
        }

        public void fromObjectDatabase(LOAITHANHVIEN ob)
        {
            this.ID = ob.ID;
            this.TenLoaiThanhVien = ob.TenLoaiThanhVien;
            this.Xoa = ob.Xoa;
        }
    }

    public partial class MUCDOPHATTRIENTHIETBI_DTO: DTO
    {
        public MUCDOPHATTRIENTHIETBI toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private string _Ten;

        public string Ten
        {
            get { return _Ten; }
            set { _Ten = value; }
        }

        public void fromObjectDatabase(MUCDOPHATTRIENTHIETBI ob)
        {
            this.ID = ob.ID;
            this.Ten = ob.Ten;
            this.Xoa = ob.Xoa;     
        }
    }

    public partial class PHANMEMCANBAN_DTO : DTO
    {
        public PHANMEMCANBAN toObjectDatabase()
        {
            PHANMEMCANBAN tt = new PHANMEMCANBAN();
            tt.CauTruc = this.CauTruc;
            tt.ChucNang = this.ChucNang;
            tt.ID = this.ID;
            tt.IDCanBan = this.IDCanBan;
            tt.MucDoPhatTrien = this.MucDoPhatTrien;
            tt.Xoa = this.Xoa;
            tt.YeuCauPhanCung = this.YeuCauPhanCung;
            return tt;
        }

        private int _IDCanBan;
        public int IDCanBan
        {
            get { return _IDCanBan; }
            set { _IDCanBan = value; }
        }
        private string _ChucNang;

        public string ChucNang
        {
            get { return _ChucNang; }
            set { _ChucNang = value; }
        }
        private string _CauTruc;

        public string CauTruc
        {
            get { return _CauTruc; }
            set { _CauTruc = value; }
        }

        private string _MucDoPhatTrien;

        public string MucDoPhatTrien
        {
            get { return _MucDoPhatTrien; }
            set { _MucDoPhatTrien = value; }
        }

        private string _YeuCauPhanCung;

        public string YeuCauPhanCung
        {
            get { return _YeuCauPhanCung; }
            set { _YeuCauPhanCung = value; }
        }

        public void fromObjectDatabase(PHANMEMCANBAN ob)
        {
            this.CauTruc = ob.CauTruc;
            this.ChucNang = ob.ChucNang;
            this.ID = ob.ID;
            this.IDCanBan = ob.IDCanBan;
            this.MucDoPhatTrien = ob.MucDoPhatTrien;
            this.Xoa = ob.Xoa;
            this.YeuCauPhanCung = ob.YeuCauPhanCung;
        }
    }

    public partial class RAOVAT_DTO : DTO
    {
        public RAOVAT_DTO()
        {
            this.ThoiGianRao = DateTime.Now;
        }

        public RAOVAT toObjectDatabase()
        {
            RAOVAT ob = new RAOVAT();
            ob.ID = this.ID;
            ob.IDTaiKhoanRaoVat = this.IDTaiKhoanRaoVat;
            ob.ThoiGianRao = this.ThoiGianRao;
            ob.Xoa = this.Xoa;
            ob.NoiDung = this.NoiDung;
            ob.ChuDe = this.ChuDe;
            return ob;
        }

        private string _ChuDe;

        public string ChuDe
        {
            get { return _ChuDe; }
            set { _ChuDe = value; }
        }

        private string _NoiDung;

        public string NoiDung
        {
            get { return _NoiDung; }
            set { _NoiDung = value; }
        }

        private int _IDTaiKhoanRaoVat;

        public int IDTaiKhoanRaoVat
        {
            get { return _IDTaiKhoanRaoVat; }
            set { _IDTaiKhoanRaoVat = value; }
        }

        private System.DateTime _ThoiGianRao;

        public System.DateTime ThoiGianRao
        {
            get { return _ThoiGianRao; }
            set { _ThoiGianRao = value; }
        }

        public void fromObjectDatabase(RAOVAT ob)
        {
            this.ID = ob.ID;
            this.IDTaiKhoanRaoVat = ob.IDTaiKhoanRaoVat;
            this.ThoiGianRao = ob.ThoiGianRao;
            this.Xoa = ob.Xoa;
            this.NoiDung = ob.NoiDung;
            this.ChuDe = ob.ChuDe;
        }
    }
    public class RAOVATDUOCQUANTAM_DTO : DTO
    {
        public RAOVATDUOCQUANTAM toObjectDatabase()
        {
            RAOVATDUOCQUANTAM tt = new RAOVATDUOCQUANTAM();
            tt.ID = this.ID;
            tt.IDTaiKhoanQuanTam = this.IDTaiKhoanQuanTam;
            tt.IDRaoVat = this.IDRaoVat;
            tt.NgayQuanTam = this.NgayQuanTam;
            tt.Xoa = this.Xoa;
            return tt;
        }
        private int _IDTaiKhoanQuanTam;

        public int IDTaiKhoanQuanTam
        {
            get { return _IDTaiKhoanQuanTam; }
            set { _IDTaiKhoanQuanTam = value; }
        }

        private int _IDRaoVat;

        public int IDRaoVat
        {
            get { return _IDRaoVat; }
            set { _IDRaoVat = value; }
        }

        private System.DateTime _NgayQuanTam;

        public System.DateTime NgayQuanTam
        {
            get { return _NgayQuanTam; }
            set { _NgayQuanTam = value; }
        }

        public void fromObjectDatabase(RAOVATDUOCQUANTAM ob)
        {
            this.ID = ob.ID;
            this.IDTaiKhoanQuanTam = ob.IDTaiKhoanQuanTam;
            this.IDRaoVat = ob.IDRaoVat;
            this.NgayQuanTam = ob.NgayQuanTam;
            this.Xoa = ob.Xoa;
        }
    }

    public class TAIKHOAN_DTO : DTO
    {
        public TAIKHOAN toObjectDatabase()
        {
            TAIKHOAN ob = new TAIKHOAN();
            ob.ID = this.ID;
            ob.TenDangNhap = this.TenDangNhap;
            ob.Email = this.Email;
            ob.DiaChi = this.DiaChi;
            ob.DiDong = this.DiDong;
            ob.DienThoai = this.DienThoai;
            ob.Fax = this.Fax;
            ob.GioiTinh = this.GioiTinh;
            ob.HoTen = this.HoTen;
            ob.IDDoanhNghiep = this.IDDoanhNghiep;
            ob.IDLoaiTK = this.IDLoaiTK;
            ob.IDLoaiTV = this.IDLoaiTV;
            ob.MatKhau = this.MatKhau;
            ob.NgaySinh = this.NgaySinh;
            ob.Xoa = this.Xoa;
            return ob;
        }
        private string _TenDangNhap;

        public string TenDangNhap
        {
            get { return _TenDangNhap; }
            set { _TenDangNhap = value; }
        }

        private string _HoTen;

        public string HoTen
        {
            get { return _HoTen; }
            set { _HoTen = value; }
        }

        private string _MatKhau;

        public string MatKhau
        {
            get { return _MatKhau; }
            set { _MatKhau = value; }
        }

        private System.DateTime _NgaySinh;

        public System.DateTime NgaySinh
        {
            get { return _NgaySinh; }
            set { _NgaySinh = value; }
        }

        private string _GioiTinh;

        public string GioiTinh
        {
            get { return _GioiTinh; }
            set { _GioiTinh = value; }
        }

        private string _Email;

        public string Email
        {
            get { return _Email; }
            set { _Email = value; }
        }

        private string _DiaChi;

        public string DiaChi
        {
            get { return _DiaChi; }
            set { _DiaChi = value; }
        }

        private string _DienThoai;

        public string DienThoai
        {
            get { return _DienThoai; }
            set { _DienThoai = value; }
        }

        private string _DiDong;

        public string DiDong
        {
            get { return _DiDong; }
            set { _DiDong = value; }
        }

        private string _Fax;

        public string Fax
        {
            get { return _Fax; }
            set { _Fax = value; }
        }

        private int _IDLoaiTV;

        public int IDLoaiTV
        {
            get { return _IDLoaiTV; }
            set { _IDLoaiTV = value; }
        }

        private int _IDLoaiTK;

        public int IDLoaiTK
        {
            get { return _IDLoaiTK; }
            set { _IDLoaiTK = value; }
        }

        private System.Nullable<int> _IDDoanhNghiep;
        public System.Nullable<int> IDDoanhNghiep
        {
            get { return _IDDoanhNghiep; }
            set { _IDDoanhNghiep = value; }
        }

        public void fromObjectDatabase(TAIKHOAN ob)
        {
            this.DiaChi = ob.DiaChi;
            this.DiDong = ob.DiDong;
            this.DienThoai = ob.DienThoai;
            this.Email = ob.Email;
            this.Fax = ob.Fax;
            this.GioiTinh = ob.GioiTinh;
            this.HoTen = ob.HoTen;
            this.ID = ob.ID;
            this.IDDoanhNghiep = ob.IDDoanhNghiep;
            this.IDLoaiTK = ob.IDLoaiTK;
            this.IDLoaiTV = ob.IDLoaiTV;
            this.MatKhau = ob.MatKhau;
            this.NgaySinh = ob.NgaySinh;
            this.TenDangNhap = ob.TenDangNhap;
            this.Xoa = ob.Xoa;
        }
    }
    public partial class THONGDIEP_DTO : DTO
    {
        public THONGDIEP toObjectDatabase()
        {
            THONGDIEP ob = new THONGDIEP();
            ob.ID = this.ID;
            ob.NguoiNhan = this.NguoihNan;
            ob.NguoiGoi = this.NguoiGoi;
            ob.ThoiGianGoi = this.ThoiGianGoi;
            ob.ThoiGianGoi = this.ThoiGianGoi;
            ob.Xoa = this.Xoa;
            ob.NoiDung = this.NoiDung;
            ob.EmailNguoiGoi = this.EmailNguoiGoi;
            ob.ChuDe = this.ChuDe;
            return ob;
        }
        private string _ChuDe;

        public string ChuDe
        {
            get { return _ChuDe; }
            set { _ChuDe = value; }
        }

        private string _NoiDung;

        public string NoiDung
        {
            get { return _NoiDung; }
            set { _NoiDung = value; }
        }

        private int _NguoiGoi;

        public int NguoiGoi
        {
            get { return _NguoiGoi; }
            set { _NguoiGoi = value; }
        }

        private string _EmailNguoiGoi;

        public string EmailNguoiGoi
        {
            get { return _EmailNguoiGoi; }
            set { _EmailNguoiGoi = value; }
        }

        private System.DateTime _ThoiGianGoi;

        public System.DateTime ThoiGianGoi
        {
            get { return _ThoiGianGoi; }
            set { _ThoiGianGoi = value; }
        }

        private int _NguoihNan;

        public int NguoihNan
        {
            get { return _NguoihNan; }
            set { _NguoihNan = value; }
        }

        public void fromObjectDatabase(THONGDIEP ob)
        {
            this.ID = ob.ID;
            this.NguoiGoi = ob.NguoiGoi;
            this.NguoihNan = ob.NguoiNhan;
            this.NoiDung = ob.NoiDung;
            this.ThoiGianGoi = ob.ThoiGianGoi;
            this.ChuDe = ob.ChuDe;
            this.EmailNguoiGoi = ob.EmailNguoiGoi;
            this.Xoa = ob.Xoa;
        }
    }

    public partial class THONGTINCANBAN_DTO : DTO
    {
        public THONGTINCANBAN toObjectDatabase()
        {
            THONGTINCANBAN cb = new THONGTINCANBAN();
            cb.HinhAnhDinhKem = this.HinhAnhDinhKem;
            cb.ID = this.ID;
            cb.IDChuyenGiao = this.IDChuyenGiao;
            cb.IDNguoiDang = this.IDNguoiDang;
            cb.LoaiCanBan = this.LoaiCanBan;
            cb.MoTa = this.MoTa;
            cb.TenAnh = this.TenAnh;
            cb.TenViet = this.TenViet;
            cb.TepTinDinhKem = this.TepTinDinhKem;
            cb.TuKhoa = this.TuKhoa;
            cb.UuDiem = this.UuDiem;
            cb.Xoa = this.Xoa;
            cb.XuatXu = this.XuatXu;
            cb.NgayDang = this.NgayDang;

            return cb;
        }

        private System.DateTime _NgayDang;
        public System.DateTime NgayDang
        {
            get { return _NgayDang; }
            set { _NgayDang = value; }
        }

        private string _TenViet;

        public string TenViet
        {
            get { return _TenViet; }
            set { _TenViet = value; }
        }

        private string _TenAnh;

        public string TenAnh
        {
            get { return _TenAnh; }
            set { _TenAnh = value; }
        }

        private string _XuatXu;

        public string XuatXu
        {
            get { return _XuatXu; }
            set { _XuatXu = value; }
        }

        private string _MoTa;

        public string MoTa
        {
            get { return _MoTa; }
            set { _MoTa = value; }
        }

        private string _UuDiem;

        public string UuDiem
        {
            get { return _UuDiem; }
            set { _UuDiem = value; }
        }

        private int _IDNguoiDang;

        public int IDNguoiDang
        {
            get { return _IDNguoiDang; }
            set { _IDNguoiDang = value; }
        }

        private string _HinhAnhDinhKem;

        public string HinhAnhDinhKem
        {
            get { return _HinhAnhDinhKem; }
            set { _HinhAnhDinhKem = value; }
        }

        private string _TepTinDinhKem;

        public string TepTinDinhKem
        {
            get { return _TepTinDinhKem; }
            set { _TepTinDinhKem = value; }
        }

        private int _LoaiCanBan;

        public int LoaiCanBan
        {
            get { return _LoaiCanBan; }
            set { _LoaiCanBan = value; }
        }

        private string _TuKhoa;

        public string TuKhoa
        {
            get { return _TuKhoa; }
            set { _TuKhoa = value; }
        }

        private System.Nullable<int> _IDThietBi;

        public System.Nullable<int> IDThietBi
        {
            get { return _IDThietBi; }
            set { _IDThietBi = value; }
        }

        private System.Nullable<int> _IDChuyenGiao;

        public System.Nullable<int> IDChuyenGiao
        {
            get { return _IDChuyenGiao; }
            set { _IDChuyenGiao = value; }
        }

        public void fromObjectDatabase(THONGTINCANBAN ob)
        {
            this.HinhAnhDinhKem = ob.HinhAnhDinhKem;
            this.ID = ob.ID;
            this.IDChuyenGiao = ob.IDChuyenGiao;
            this.IDNguoiDang = ob.IDNguoiDang;
            this.LoaiCanBan = ob.LoaiCanBan;
            this.MoTa = ob.MoTa;
            this.TenAnh = ob.TenAnh;
            this.TenViet = ob.TenViet;
            this.TepTinDinhKem = ob.TepTinDinhKem;
            this.TuKhoa = ob.TuKhoa;
            this.UuDiem = ob.UuDiem;
            this.Xoa = ob.Xoa;
            this.XuatXu = ob.XuatXu;
            this.NgayDang = ob.NgayDang;

        }
    }
    public partial class THONGTINCHUYENGIAOCANBAN_DTO : DTO
    {
        public THONGTINCHUYENGIAOCANBAN toObjectDatabase()
        {
            THONGTINCHUYENGIAOCANBAN x = new THONGTINCHUYENGIAOCANBAN();
            x.BaoHanh = this.BaoHanh;
            x.ChiPhiKhac = this.ChiPhiKhac;
            x.DanhSachDonViChuyenGiao = this.DanhSachDonViChuyenGiao;
            x.GiaKhoiDiem = this.GiaKhoiDiem;
            x.ID = this.ID;
            x.Xoa = this.Xoa;
            return x;
        }
        private string _GiaKhoiDiem;

        public string GiaKhoiDiem
        {
            get { return _GiaKhoiDiem; }
            set { _GiaKhoiDiem = value; }
        }

        private string _ChiPhiKhac;

        public string ChiPhiKhac
        {
            get { return _ChiPhiKhac; }
            set { _ChiPhiKhac = value; }
        }

        private string _BaoHanh;

        public string BaoHanh
        {
            get { return _BaoHanh; }
            set { _BaoHanh = value; }
        }

        private string _DanhSachDonViChuyenGiao;

        public string DanhSachDonViChuyenGiao
        {
            get { return _DanhSachDonViChuyenGiao; }
            set { _DanhSachDonViChuyenGiao = value; }
        }

        public void fromObjectDatabase(THONGTINCHUYENGIAOCANBAN ob)
        {
            throw new NotImplementedException();
        }

    }
    public partial class THONGTINLAPDAT_DTO : DTO
    {
        public THONGTINLAPDAT toObjectDatabase()
        {
            THONGTINLAPDAT ob = new THONGTINLAPDAT();
            ob.ID = ID;
            ob.LuongDienTieuThu = LuongDienTieuThu;
            ob.LuongKhiDotDauTieuThu = LuongKhiDotDauTieuThu;
            ob.LuongNhienLieuTieuThu = LuongNhienLieuTieuThu;
            ob.MatBang = MatBang;
            ob.SoCongNhan = SoCongNhan;
            ob.SoKySu = SoKySu;
            ob.SoKyThuatVien = SoKyThuatVien;
            ob.SoNhanLuc = SoNhanLuc;
            ob.Xoa = Xoa;

            return ob;
        }
        private System.Nullable<int> _SoNhanLuc;

        public System.Nullable<int> SoNhanLuc
        {
            get { return _SoNhanLuc; }
            set { _SoNhanLuc = value; }
        }

        private System.Nullable<int> _SoKySu;

        public System.Nullable<int> SoKySu
        {
            get { return _SoKySu; }
            set { _SoKySu = value; }
        }

        private System.Nullable<int> _SoKyThuatVien;

        public System.Nullable<int> SoKyThuatVien
        {
            get { return _SoKyThuatVien; }
            set { _SoKyThuatVien = value; }
        }

        private System.Nullable<int> _SoCongNhan;

        public System.Nullable<int> SoCongNhan
        {
            get { return _SoCongNhan; }
            set { _SoCongNhan = value; }
        }

        private string _LuongDienTieuThu;

        public string LuongDienTieuThu
        {
            get { return _LuongDienTieuThu; }
            set { _LuongDienTieuThu = value; }
        }

        private string _LuongKhiDotDauTieuThu;

        public string LuongKhiDotDauTieuThu
        {
            get { return _LuongKhiDotDauTieuThu; }
            set { _LuongKhiDotDauTieuThu = value; }
        }

        private string _MatBang;

        public string MatBang
        {
            get { return _MatBang; }
            set { _MatBang = value; }
        }

        private string _LuongNhienLieuTieuThu;

        public string LuongNhienLieuTieuThu
        {
            get { return _LuongNhienLieuTieuThu; }
            set { _LuongNhienLieuTieuThu = value; }
        }

        public void fromObjectDatabase(THONGTINLAPDAT ob)
        {
            throw new NotImplementedException();
        }
    }
    public partial class THONGTINTHIETBICONGNGHE_DTO : DTO
    {
        public THONGTINTHIETBICONGNGHE toObjectDatabase()
        {
            THONGTINTHIETBICONGNGHE tt = new THONGTINTHIETBICONGNGHE();
            tt.ChiTieuKinhTeKyThuat = this.ChiTieuKinhTeKyThuat;
            tt.CongSuatNangSuat = this.CongSuatNangSuat;
            tt.ID = this.ID;
            tt.IDMucDoPhatTrien = this.IDMucDoPhatTrien;
            tt.IDThongTinLapDat = this.IDThongTinLapDat;
            tt.IDTieuChuan = this.IDTieuChuan;
            tt.IDXuatXuDeTai = this.IDXuatXuDeTai;
            tt.NamHoanThien = this.NamHoanThien;
            tt.IDCanBan = this.IDCanBan;
            tt.Xoa = this.Xoa;
            return tt;
        }
        private string _CongSuatNangSuat;

        public string CongSuatNangSuat
        {
            get { return _CongSuatNangSuat; }
            set { _CongSuatNangSuat = value; }
        }

        private string _ChiTieuKinhTeKyThuat;

        public string ChiTieuKinhTeKyThuat
        {
            get { return _ChiTieuKinhTeKyThuat; }
            set { _ChiTieuKinhTeKyThuat = value; }
        }

        private System.Nullable<int> _IDTieuChuan;

        public System.Nullable<int> IDTieuChuan
        {
            get { return _IDTieuChuan; }
            set { _IDTieuChuan = value; }
        }

        private int _IDCanBan;

        public int IDCanBan
        {
            get { return _IDCanBan; }
            set { _IDCanBan = value; }
        }

        private System.Nullable<int> _IDMucDoPhatTrien;

        public System.Nullable<int> IDMucDoPhatTrien
        {
            get { return _IDMucDoPhatTrien; }
            set { _IDMucDoPhatTrien = value; }
        }

        private System.Nullable<int> _IDXuatXuDeTai;

        public System.Nullable<int> IDXuatXuDeTai
        {
            get { return _IDXuatXuDeTai; }
            set { _IDXuatXuDeTai = value; }
        }

        private System.Nullable<int> _NamHoanThien;

        public System.Nullable<int> NamHoanThien
        {
            get { return _NamHoanThien; }
            set { _NamHoanThien = value; }
        }

        private System.Nullable<int> _IDThongTinLapDat;

        public System.Nullable<int> IDThongTinLapDat
        {
            get { return _IDThongTinLapDat; }
            set { _IDThongTinLapDat = value; }
        }

        public void fromObjectDatabase(THONGTINTHIETBICONGNGHE ob)
        {
            this.ChiTieuKinhTeKyThuat = ob.ChiTieuKinhTeKyThuat;
            this.CongSuatNangSuat = ob.CongSuatNangSuat;
            this.ID = ob.ID;
            this.IDMucDoPhatTrien = ob.IDMucDoPhatTrien;
            this.IDThongTinLapDat = ob.IDThongTinLapDat;
            this.IDTieuChuan = ob.IDTieuChuan;
            this.IDXuatXuDeTai = ob.IDXuatXuDeTai;
            this.NamHoanThien = ob.NamHoanThien;
            this.IDCanBan = ob.IDCanBan;
            this.Xoa = ob.Xoa;
        }
    }

    public partial class THONGTINTIMMUA_DTO : DTO
    {
        public THONGTINTIMMUA toObjectDatabase()
        {
            THONGTINTIMMUA ttTimMua = new THONGTINTIMMUA();
            ttTimMua.ID = this.ID;
            ttTimMua.IDNguoiDang = this.IDNguoiDang;
            ttTimMua.LoaiCanBan = this.LoaiCanBan;
            ttTimMua.MoTa = this.MoTa;
            ttTimMua.SanXuatSauNam = this.SanXuatSauNam;
            ttTimMua.TenAnh = this.TenAnh;
            ttTimMua.TenViet = this.TenViet;
            ttTimMua.ThongTinKhac = this.ThongTinKhac;
            ttTimMua.TuKhoa = this.TuKhoa;
            ttTimMua.Xoa = this.Xoa;
            ttTimMua.XuatXu = this.XuatXu;
            ttTimMua.NgayDang = this.NgayDang;
            return ttTimMua;
        }

        private DateTime _NgayDang;

        public DateTime NgayDang
        {
            get { return _NgayDang; }
            set { _NgayDang = value; }
        }

        private string _TenViet;

        public string TenViet
        {
            get { return _TenViet; }
            set { _TenViet = value; }
        }

        private string _TenAnh;

        public string TenAnh
        {
            get { return _TenAnh; }
            set { _TenAnh = value; }
        }

        private string _XuatXu;

        public string XuatXu
        {
            get { return _XuatXu; }
            set { _XuatXu = value; }
        }

        private string _MoTa;

        public string MoTa
        {
            get { return _MoTa; }
            set { _MoTa = value; }
        }

        private int _IDNguoiDang;

        public int IDNguoiDang
        {
            get { return _IDNguoiDang; }
            set { _IDNguoiDang = value; }
        }

        private System.Nullable<int> _SanXuatSauNam;

        public System.Nullable<int> SanXuatSauNam
        {
            get { return _SanXuatSauNam; }
            set { _SanXuatSauNam = value; }
        }

        private string _ThongTinKhac;

        public string ThongTinKhac
        {
            get { return _ThongTinKhac; }
            set { _ThongTinKhac = value; }
        }

        private int _LoaiCanBan;

        public int LoaiCanBan
        {
            get { return _LoaiCanBan; }
            set { _LoaiCanBan = value; }
        }

        private string _TuKhoa;

        public string TuKhoa
        {
            get { return _TuKhoa; }
            set { _TuKhoa = value; }
        }

        public void fromObjectDatabase(THONGTINTIMMUA ob)
        {
            this.ID = ob.ID;
            this.IDNguoiDang = ob.IDNguoiDang;
            this.LoaiCanBan = ob.LoaiCanBan;
            this.MoTa = ob.MoTa;
            this.SanXuatSauNam = ob.SanXuatSauNam;
            this.TenAnh = ob.TenAnh;
            this.TenViet = ob.TenViet;
            this.ThongTinKhac = ob.ThongTinKhac;
            this.TuKhoa = ob.TuKhoa;
            this.Xoa = ob.Xoa;
            this.XuatXu = ob.XuatXu;
            this.NgayDang = ob.NgayDang;
        }
    }

    public partial class TIEUCHUANTHIETBI_DTO: DTO 
    {
        public TIEUCHUANTHIETBI toObjectDatabase()
        {
            throw new NotImplementedException();
        }
        private string _Ten;

        public string Ten
        {
            get { return _Ten; }
            set { _Ten = value; }
        }

        public void fromObjectDatabase(TIEUCHUANTHIETBI ob)
        {
            this.ID = ob.ID;
            this.Ten = ob.Ten;
            this.Xoa = ob.Xoa;
        }
    }

    public partial class TINTUC_DTO : DTO
    {
        public TINTUC toObjectDatabase()
        {

            TINTUC tt = new TINTUC();
            tt.ID = this.ID;
            tt.NgayDang = this.NgayDang;
            tt.NoiDung = this.NoiDung;
            tt.TieuDe = this.TieuDe;
            tt.Xoa = this.Xoa;
            return tt;

        }
        private string _NoiDung;

        public string NoiDung
        {
            get { return _NoiDung; }
            set { _NoiDung = value; }
        }

        private string _TieuDe;
        public string TieuDe
        {
            get { return _TieuDe; }
            set { _TieuDe = value; }
        }
        private System.DateTime _NgayDang;

        public System.DateTime NgayDang
        {
            get { return _NgayDang; }
            set { _NgayDang = value; }
        }

        public void fromObjectDatabase(TINTUC ob)
        {
            this.ID = ob.ID;
            this.NgayDang = ob.NgayDang;
            this.NoiDung = ob.NoiDung;
            this.TieuDe = ob.TieuDe;
            this.Xoa = ob.Xoa;

        }
    }

    public class TIEUCHUANTIMMUA_DTO : DTO
    {
        public TIEUCHUANTIMMUA toObjectDatabase()
        {

            TIEUCHUANTIMMUA tt = new TIEUCHUANTIMMUA();
            tt.ID = this.ID;
            tt.IDTieuChuan = this.IDTieuChuan;
            tt.IDTimMua = this.IDTimMua;
            tt.Xoa = this.Xoa;
            return tt;

        }
        public void fromObjectDatabase(TIEUCHUANTIMMUA ob)
        {
            this.ID = ob.ID;
            this.IDTieuChuan = ob.IDTieuChuan;
            this.IDTimMua = ob.IDTimMua;
            this.Xoa = ob.Xoa;

        }
        private int _IDTieuChuan;

        public int IDTieuChuan
        {
            get { return _IDTieuChuan; }
            set { _IDTieuChuan = value; }
        }

        private int _IDTimMua;

        public int IDTimMua
        {
            get { return _IDTimMua; }
            set { _IDTimMua = value; }
        }

    }

    public class CHUYENGIAOTIMMUA_DTO : DTO
    {
        public CHUYENGIAOTIMMUA toObjectDatabase()
        {

            CHUYENGIAOTIMMUA tt = new CHUYENGIAOTIMMUA();
            tt.ID = this.ID;
            tt.IDChuyenGiao = this.IDChuyenGiao;
            tt.IDTimMua = this.IDTimMua;
            tt.Xoa = this.Xoa;
            return tt;

        }
        public void fromObjectDatabase(CHUYENGIAOTIMMUA ob)
        {
            this.ID = ob.ID;
            this.IDChuyenGiao = ob.IDChuyenGiao;
            this.IDTimMua = ob.IDTimMua;
            this.Xoa = ob.Xoa;

        }
        private int _IDChuyenGiao;

        public int IDChuyenGiao
        {
            get { return _IDChuyenGiao; }
            set { _IDChuyenGiao = value; }
        }

        private int _IDTimMua;

        public int IDTimMua
        {
            get { return _IDTimMua; }
            set { _IDTimMua = value; }
        }
    }
    
}
